
# -*- coding: UTF-8 -*-
import time


def lj_time(key='LJ'):
    """时间统计函数"""
    def decorator(func):
        def wrapper(*args, **kwargs):
            print("功能[{}]执行开始".format(key))
            start_time = time.time()
            res = func(*args, **kwargs)
            print("功能[{}]执行结束,耗时[{}]".format(key, time.time() - start_time))
            return res
        return wrapper
    return decorator
